package com.fafa.swing.richclient02;

import javax.swing.*;
import java.awt.*;

/**
 * @author : fafa
 * @version V1.0
 * @Project: SwingTest
 * @Package com.fafa.swing.richclient02
 * @Description: OvalComponent
 * @date Date : 2019年11月27日 21:52
 */
public class OvalComponent extends JComponent {
    @Override
    protected void paintComponent(Graphics g) {
        //super.paintComponent(g);
        g.setColor(getBackground());
        g.fillRect(0,0,getWidth(),getHeight());
        g.setColor(Color.lightGray);
        g.fillOval(0,0,getHeight(),getHeight());
    }
}
